import prompt from '@system.prompt';

export default {
    change: function (e) {
        console.log("Tab index: " + e.index);
    },
    data: {
        fenlei: [{
                     id: 1,
                     name: "脑洞",
                     url: '/common/images/0ebb8259a674a8e8b472dddd1f05490a.jpeg',
                 }, {
                     id: 2,
                     name: "都市",
                     url: "/common/images/2c365b6abfde0cc5d0ee620372ed45bf.jpeg",
                 }, {
                     id: 3,
                     name: "玄幻",
                     url: "/common/images/5e208a1ba5810dfc2307f102338fb744.jpeg",
                 }, {
                     id: 4,
                     name: "历史",
                     url: "/common/images/5309a6c251c8cd2231869b35c01cdadc.jpeg",
                 }, {
                     id: 5,
                     name: "游戏",
                     url: "/common/images/93063b015bd8962f0dd616d1f0595d3b.jpg",
                 }, {
                     id: 6,
                     name: "奇闻",
                     url: "/common/images/b56be129706194d3810a8fe4c1133aa3.jpeg",
                 }, {
                     id: 7,
                     name: "异能",
                     url: "/common/images/d553b748aee4bed30687d0af9a167a20.jpeg",
                 }, {
                     id: 8,
                     name: "仙侠",
                     url: "/common/images/e02ca7d96b96041865fd2ea9faf958d9.jpeg",
                 }, {
                     id: 9,
                     name: "武侠",
                     url: "/common/images/e6ce41d1f5c27c49a747950a8d532c27.jpeg",
                 }, {
                     id: 10,
                     name: "科幻",
                     url: "/common/images/e88b74d219bbc5f7b67165be4cd9b1a4.jpeg",
                 }, {
                     id: 11,
                     name: "体育",
                     url: "/common/images/fddc484c1f6a1b699624bb3d17eb779f.jpeg",
                 }, {
                     id: 12,
                     name: "影视",
                     url: "/common/images/5309a6c251c8cd2231869b35c01cdadc.jpeg",
                 },
        ],
        fenlei1: [{
                      id: 1, name: "都市脑洞",
                  },
                  {
                      id: 2, name: "玄幻脑洞",
                  },
                  {
                      id: 3, name: "历史脑洞",
                  },
                  {
                      id: 4, name: "洪荒",
                  },
                  {
                      id: 5, name: "末世",
                  },
                  {
                      id: 6, name: "特色题材",
                  },
                  {
                      id: 7, name: "同人",
                  },
                  {
                      id: 8, name: "乡村",
                  },
                  {
                      id: 9, name: "校园",
                  },
                  {
                      id: 10, name: "民国",
                  },
                  {
                      id: 11, name: "架空",
                  },
                  {
                      id: 12, name: "万界",
                  },
                  {
                      id: 13, name: "异界",
                  },
                  {
                      id: 14, name: "大唐",
                  },
                  {
                      id: 15, name: "三国",
                  },
                  {
                      id: 16, name: "大明",
                  },
                  {
                      id: 17, name: "大秦",
                  },
                  {
                      id: 18, name: "年代",
                  },
                  {
                      id: 19, name: "西游",
                  },
                  {
                      id: 20, name: "星际",
                  },
                  {
                      id: 21, name: "未来",
                  },
                  {
                      id: 22, name: "西方",
                  },
                  {
                      id: 23, name: "奇幻",
                  },
                  {
                      id: 24, name: "中短篇",
                  },
        ],
        fenlei2: [{
                      id: 1, name: "重生",
                  },
                  {
                      id: 2, name: "无限流",
                  },
                  {
                      id: 3, name: "推理",
                  },
                  {
                      id: 4, name: "修仙",
                  },
                  {
                      id: 5, name: "网游",
                  },
                  {
                      id: 6, name: "盗墓",
                  },
                  {
                      id: 7, name: "斩神",
                  },
                  {
                      id: 8, name: "破案",
                  },
                  {
                      id: 9, name: "山海经",
                  },
                  {
                      id: 10, name: "无敌",
                  },
                  {
                      id: 11, name: "种田",
                  },
                  {
                      id: 12, name: "宠物",
                  },
                  {
                      id: 13, name: "剑道",
                  },
                  {
                      id: 14, name: "三国",
                  },
                  {
                      id: 15, name: "电竞",
                  },
                  {
                      id: 16, name: "求生",
                  },
                  {
                      id: 17, name: "海岛",
                  },
                  {
                      id: 18, name: "抓鬼",
                  },
                  {
                      id: 19, name: "卡牌",
                  },
                  {
                      id: 20, name: "黑化",
                  },
                  {
                      id: 21, name: "迪化",
                  },
                  {
                      id: 22, name: "火影",
                  },
                  {
                      id: 23, name: "直播",
                  },
                  {
                      id: 24, name: "美食",
                  },
                  {
                      id: 25, name: "家庭",
                  },
                  {
                      id: 26, name: "副本",
                  },
                  {
                      id: 27, name: "钓鱼",
                  },
                  {
                      id: 28, name: "龙珠",
                  },
                  {
                      id: 29, name: "魂穿",
                  },
                  {
                      id: 29, name: "体穿",
                  },

        ],
        fenlei3: [{
                      id: 1, name: "单女主",
                  },
                  {
                      id: 2, name: "校花",
                  },
                  {
                      id: 3, name: "扮猪吃虎",
                  },
                  {
                      id: 4, name: "反派",
                  },
                  {
                      id: 5, name: "特种兵",
                  },
                  {
                      id: 6, name: "皇帝",
                  },
                  {
                      id: 7, name: "女帝",
                  },
                  {
                      id: 8, name: "大小姐",
                  },
                  {
                      id: 9, name: "无女主",
                  },
                  {
                      id: 10, name: "神医",
                  },
                  {
                      id: 11, name: "大佬",
                  },
                  {
                      id: 12, name: "天才",
                  },
                  {
                      id: 13, name: "赘婿",
                  },
                  {
                      id: 14, name: "群像",
                  },
                  {
                      id: 15, name: "学霸",
                  },
                  {
                      id: 16, name: "宫廷侯爵",
                  },
                  {
                      id: 17, name: "战神",
                  },
                  {
                      id: 18, name: "游戏主播",
                  },
                  {
                      id: 19, name: "奶爸",
                  },
                  {
                      id: 20, name: "腹黑",
                  },
                  {
                      id: 21, name: "特工",
                  },
                  {
                      id: 22, name: "神探",
                  },
                  {
                      id: 23, name: "全能",
                  },
        ],
        fenlei4: [{
                      id: 1, name: "悬疑",
                  },
                  {
                      id: 2, name: "灵异",
                  },
                  {
                      id: 3, name: "搞笑轻松",
                  },
                  {
                      id: 4, name: "玄幻",
                  },
                  {
                      id: 5, name: "都市",
                  },
                  {
                      id: 6, name: "克苏鲁",
                  },
                  {
                      id: 7, name: "规侧怪谈",
                  },
                  {
                      id: 8, name: "都市异能",
                  },
                  {
                      id: 9, name: "东方玄幻",
                  },
                  {
                      id: 10, name: "历史古代",
                  },
                  {
                      id: 11, name: "轻小说",
                  },
                  {
                      id: 12, name: "灵气复苏",
                  },
                  {
                      id: 13, name: "架空",
                  },
                  {
                      id: 14, name: "武侠",
                  },
                  {
                      id: 15, name: "赛博朋克",
                  },
                  {
                      id: 16, name: "体育",
                  },
                  {
                      id: 17, name: "宝可梦",
                  },
                  {
                      id: 18, name: "开局",
                  },
                  {
                      id: 19, name: "断层",
                  },
                  {
                      id: 20, name: "天灾",
                  },
                  {
                      id: 21, name: "综漫",
                  },
                  {
                      id: 22, name: "武将",
                  },
                  {
                      id: 23, name: "谍战",
                  },
                  {
                      id: 24, name: "清朝",
                  },
                  {
                      id: 25, name: "第一人称",
                  },
                  {
                      id: 26, name: "末日求生",
                  },

        ],
        fresh: false,
        loadmore: false,
        refresh: function (e) {
            prompt.showToast({
                message: '刷新中...'
            })
            var that = this;
            that.fresh = e.refreshing;
            setTimeout(function () {
                that.fresh = false;
                prompt.showToast({
                    message: '刷新完成！'
                })
            }, 2000)
        },
    },
    data1: {
        on_index: 0,
        indicator_text_nav_text:['推荐','男生','女生','图书','听书','必读榜'],
    },
    swipe(e) {
        if (e.direction == 'left' && this.on_index < 5) {
            ++this.on_index;
        }
        else if(e.direction == 'right' && this.on_index > 0){
            --this.on_index;

        }
    }
}

